import { Command } from '@/commands/command.ts'
import { new_command } from '@/models/command.ts'

export class SearchCommand extends Command {
    public static new(args: string): Command {
        const command = new_command()
        command.args = args
        command.name = 'search'
        command.component = 'LinkCommandComponent'

        return new SearchCommand(command, false)
    }

    usage(): string {
        return 'search [--baidu|--bing] 关键词'
    }

    description(): string {
        return `<div>搜索关键词，默认使用谷歌引擎</div>
        <br/>
        <div>选项说明:</div>
        <br/>
        <div class="option-row"><span class="option-option">--baidu</span><span>使用百度搜索引擎</span></div>
        <div class="option-row"><span class="option-option">--bing</span><span>使用必应搜索引擎</span></div>`
    }
}
